package com.rpc.rpcserverdef;

import java.util.Properties;

/**
 * Interface for wrapping RPC server to work within RPC Server Container.
 */
public interface RpcServer {
    /**
     * Method called by RPC Server Container to start an instance of the RPC 
     * server.
     * 
     * @param appConfig
     *  The configuration for the RPC server to use.
     * @throws RpcServerException The implementation may or may not actually have
     * a case that throws the RpcServerException.
     */
    void start(Properties appConfig) throws RpcServerException;
    
    /**
     * Stops the server instance.
     * 
     * @throws RpcServerException The implementation may or may not actually have
     * a case that throws the RpcServerException.
     */
    void stop() throws RpcServerException;
    
    /**
     * The name of the RPC service which is used to reference in RPC server application
     * configurations.
     * 
     * @return The name of this RPC Service. 
     */
    String getName();
    
}
